#include<bits/stdc++.h>
#define int long long
#define N 200000 + 7
#define M 1000000 + 7
//#define DEBUG

using namespace std;

int t, n, a[N];
map<int, int> mp;

signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    #ifndef DEBUG
    freopen("color.in", "r", stdin);
    freopen("color.out", "w", stdout);
    #endif // DEBUG
    for(int ti=0; ti<t; ti++){
        cin >> n;
        int fl = 0, ans = 0;
        for(int i=1; i<=n; i++){
            cin >> a[i];
            mp[a[i]]++;
            if(mp[a[i]] > 1) fl = 1;
        }
        if(!fl){
            cout << 0;
            continue;
        }
        for(auto i: mp){
            ans += i.first * (i.second / 2);
        }
        cout << ans << "\n";
    }
    return 0;
}
